package net.zoneland.knowledge.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Optional;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.zoneland.knowledge.constant.Constants;

/**
 * 审批记录.
 * @author zmq
 * @Date 2022/8/9 10:09
 */
public class WorkApproveOpinion implements Serializable {
    private static final long serialVersionUID = -6615216735231771641L;
    /**
     * 主键.
     */
    private String id;
    /**
     * 审批时间.
     */
    @JsonFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT, timezone = "GMT+8")
    @DateTimeFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT)
    private Date approveTime;
    /**
     * 处理人uid.
     */
    private String approveUid;
    /**
     * 处理人姓名.
     */
    private String approveName;
    /**
     * 处理意见.
     */
    private String opinion;
    /**
     * 选择决策.
     */
    private String decision;
    /**
     * 处理人部门名称.
     */
    private String deptName;
    /**
     * 处理人部门dn.
     */
    private String deptDn;
    /**
     * 工单主键id.
     */
    private String workApplyId;

    /**
     * 审批节点.
     */
    private String nodeId;

    /**
     * 操作描述.
     * <p>操作描述和处理意见opinion字段类似，区别在于
     *   <li>处理意见opinion：处理人写的</li>
     *   <li>操作描述：程序产生的、用于描述用户行为的一段话，比如“把任务分派给张三”，“把工单转交给李四”等等</li>
     * </p>
     */
    private String operationDescription;

    /**
     * 状态
     */
    private String workStatus;

    /**
     * 子任务id
     */
    private String subTaskId;

    /**
     * 抄送uid
     */
    private String copySubmitUid;

    /**
     * 抄送名字
     */
    private String copySubmitName;

    public String getCopySubmitUid() {
        return copySubmitUid;
    }

    public void setCopySubmitUid(String copySubmitUid) {
        this.copySubmitUid = copySubmitUid;
    }

    public String getCopySubmitName() {
        return copySubmitName;
    }

    public void setCopySubmitName(String copySubmitName) {
        this.copySubmitName = copySubmitName;
    }

    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getWorkApplyId() {
        return workApplyId;
    }
    /**
     * 设置 属性值.
     * @param workApplyId 属性值
     */
    public void setWorkApplyId(final String workApplyId) {
        this.workApplyId = workApplyId;
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getDeptName() {
        return deptName;
    }
    /**
     * 设置 属性值.
     * @param deptName 属性值
     */
    public void setDeptName(final String deptName) {
        this.deptName = deptName;
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getDeptDn() {
        return deptDn;
    }
    /**
     * 设置 属性值.
     * @param deptDn 属性值
     */
    public void setDeptDn(final String deptDn) {
        this.deptDn = deptDn;
    }

    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getId() {
        return id;
    }
    /**
     * 设置 属性值.
     * @param id 属性值
     */
    public void setId(String id) {
        this.id = id;
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public Date getApproveTime() {
        return Optional.ofNullable(approveTime).map(it -> (Date)it.clone()).orElse(null);
    }
    /**
     * 设置 属性值.
     * @param approveTime 属性值
     */
    public void setApproveTime(final Date approveTime) {
        this.approveTime = Optional.ofNullable(approveTime).map(it -> (Date)it.clone()).orElse(null);
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getApproveUid() {
        return approveUid;
    }
    /**
     * 设置 属性值.
     * @param approveUid 属性值
     */
    public void setApproveUid(final String approveUid) {
        this.approveUid = approveUid;
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getApproveName() {
        return approveName;
    }
    /**
     * 设置 属性值.
     * @param approveName 属性值
     */
    public void setApproveName(final String approveName) {
        this.approveName = approveName;
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getOpinion() {
        return opinion;
    }
    /**
     * 设置 属性值.
     * @param opinion 属性值
     */
    public void setOpinion(final String opinion) {
        this.opinion = opinion;
    }
    /**
     * 获取 属性值.
     * @return 属性值
     */
    public String getDecision() {
        return decision;
    }
    /**
     * 设置 属性值.
     * @param decision 属性值
     */
    public void setDecision(final String decision) {
        this.decision = decision;
    }

    public String getNodeId() {
        return nodeId;
    }

    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }

    /**
     * Gets the value of operationDescription.
     *
     * @return the value of operationDescription
     */
    public String getOperationDescription() {
        return operationDescription;
    }

    /**
     * Sets the operationDescription.
     *
     * @param operationDescription operationDescription
     */
    public void setOperationDescription(final String operationDescription) {
        this.operationDescription = operationDescription;
    }

    public String getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(String workStatus) {
        this.workStatus = workStatus;
    }

    public String getSubTaskId() {
        return subTaskId;
    }

    public void setSubTaskId(String subTaskId) {
        this.subTaskId = subTaskId;
    }
}
